/* Yet Another Experimental Software Renderer
 *
 * Copyright (c) 2010 Pawel "Hery" Dziepak
 */

#include "utils.h"
#include "domain_shader.h"

using namespace yaesr;

vertex domain_shader_impl::execute(vec2 uv, vertex in) {
	vertex out = in;
	vec4 displacement = (vec4)displace->get_color(uv);
	displacement.x = displacement.w;
	out.position += (displacement + vec4(-0.5, -0.5, -0.5, -0.5)) / 15.0;
	return out;
}
